home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
utility
/
ffg155.zip
/
DEMO_BAT.ZIP
/
RUNTREE.BAT
< prev
next >
Wrap
DOS Batch File
|
1993-08-16
|
1KB
|
36 lines
@echo off
cls
echo Here is a demonstration of FFG's ability to execute commands for each
echo found file using the '/e' option. In this demo FFG will search for the
echo DOS program TREE.COM and execute it. You will be prompted before the
echo program is executed.
echo.
echo (Of course, this program is most likely in your DOS search path so you
echo wouldn't need to use FFG to go find and execute it, but it is used to
echo illustrate the option.)
echo.
echo Note the use of the /1 option to stop FFG after the first TREE.COM is found.
echo.
echo Press any key to begin searching...
pause >nul
echo on
ffg *:tree.com /e /1
@echo off
echo Done. Press any key for next demonstration...
pause>nul
cls
echo Note that the last demonstration of running the TREE program attempted to
echo show the tree starting from the DOS directory. It would be more useful to
echo to show it from the root directory. We can do this with FFG by specifying
echo the command line with the /e option switch. Here's how:
echo.
echo Press any key to begin searching...
pause >nul
echo on
:: Note that double %%'s are required because the DOS batch file interpreter
:: removes one of them.
ffg *:tree.com /e%%N%%_\ /1
@echo off
echo Done. Press any key for next demonstration...
pause>nul